package cn.nucpyh.soft;

public class PartClass {
//    局部内部类

     String name;
    void test1(){
        System.out.println("外部成员变量");
    }
//    局部内部类=方法内部类
    void test2(){
        class Inner{
            int age = 0;
            void show(){
                System.out.println("外部成员变量name:" + name);
                test1();
            }
        }
        Inner inner =new Inner();
        System.out.println("局部内部变量age:" + inner.age);
    }
    public static void main(String[] args) {
        PartClass partclass = new PartClass();
        partclass.test1();
        partclass.test2();
    }
}
